package com.game.majiang.vo;

import java.util.ArrayList;

import javax.sql.rowset.CachedRowSet;

import com.game.server.db.SqlHelper;

public class CYVo {

	public int id;
	public String name;
	public String spell;
	public String content;
	public String derivation;
	public String samples;
	public String words;
	public String worde;
	public String pinyins;
	public String pinyine;

	public static ArrayList<CYVo> getListCy() {
		String sql = "SELECT * FROM  cy";
		CachedRowSet resultSet = SqlHelper.getResultSet(sql);
		ArrayList<CYVo> list = new ArrayList<CYVo>();
		try {
			while (resultSet.next()) {
				CYVo cy = new CYVo();
				cy.content = resultSet.getString("content");
				cy.derivation = resultSet.getString("derivation");
				cy.id = resultSet.getInt("id");
				cy.name = resultSet.getString("name");
				cy.pinyine = resultSet.getString("pinyine");
				cy.pinyins = resultSet.getString("pinyins");
				cy.samples = resultSet.getString("samples");
				cy.spell = resultSet.getString("spell");
				cy.worde = resultSet.getString("worde");
				cy.words = resultSet.getString("words");
				list.add(cy);

			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}

}
